package io.renren.modules.forYoung.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.renren.modules.sys.entity.ImgEntiy;

import java.text.SimpleDateFormat;
import java.util.*;

public class ForYounyEntity {
    private Integer id;
    private String title;
    private byte[] titleB;
    private String imgs;
    private Double lng;// 经度
    private Double lat;// 维度
    private String address ;
    private String addressPoi;
    private Long userId;
    private String nackName;
    private byte[] nickNameB;
    private String headImg;
    private String type;
    private String imgswh;
    private List<ImgEntiy> imgList;
    private String firstCommentUserName;
    private byte[] firstCommentUserNameB;
    private Integer firstCommentId;
    private String firstCommentContent;
    private byte[] firstCommentContentB;
    private Integer firstCommentUserId;
    private Integer likeCount;//点赞数
    private Integer commentCount;//评论数
    private Integer shareCount;//分享次数
    private Integer collectionCount;//收藏次数
    private Integer isLike;//点赞
    private Integer isCollection;//收藏
    private Integer isFollow;//关注
    private double distance;
    private String distanceStr;
    private String schoolName;

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public byte[] getTitleB() {
        return titleB;
    }

    public void setTitleB(byte[] titleB) {
        this.titleB = titleB;
    }

    public byte[] getNickNameB() {
        return nickNameB;
    }

    public void setNickNameB(byte[] nickNameB) {
        this.nickNameB = nickNameB;
    }

    public byte[] getFirstCommentUserNameB() {
        return firstCommentUserNameB;
    }

    public void setFirstCommentUserNameB(byte[] firstCommentUserNameB) {
        this.firstCommentUserNameB = firstCommentUserNameB;
    }

    public byte[] getFirstCommentContentB() {
        return firstCommentContentB;
    }

    public void setFirstCommentContentB(byte[] firstCommentContentB) {
        this.firstCommentContentB = firstCommentContentB;
    }

    public double getDistance() {
        return distance;
    }

    public void setDistance(double distance) {
        this.distance = distance;
    }

    public String getDistanceStr() {
        return distanceStr;
    }

    public void setDistanceStr(String distanceStr) {
        this.distanceStr = distanceStr;
    }

    public Integer getIsFollow() {
        return isFollow;
    }

    public void setIsFollow(Integer isFollow) {
        this.isFollow = isFollow;
    }

    private List<ForYoungComment> forYoungCommentList;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;  //评论时间

    public List<ForYoungComment> getForYoungCommentList() {
        return forYoungCommentList;
    }

    public void setForYoungCommentList(List<ForYoungComment> forYoungCommentList) {
        this.forYoungCommentList = forYoungCommentList;
    }
    public Date getCreateTime() {
        /*TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");
        TimeZone.setDefault(tz);*/
        /*Properties props=System.getProperties();
        Iterator iter=props.keySet().iterator();
        while(iter.hasNext());
        String key=(String)iter.next();
        System.out.println(key+" = "+ props.get(key));*/
        return createTime;
    }


// 用于解决时差8小时问题

    private static String formDate(Date value) {
        String newValue = "null";
        try {
            SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
            if (value == null) {
                return "null";
            }
            Calendar ca = Calendar.getInstance();
            ca.setTime(value);
            ca.add(Calendar.HOUR_OF_DAY, 8);
            newValue = "\"" + f.format(ca.getTime()) + "\"";
        } catch (Exception e) {
            e.printStackTrace();
        }
        return newValue;
    }


    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getFirstCommentUserName() {
        return firstCommentUserName;
    }

    public void setFirstCommentUserName(String firstCommentUserName) {
        this.firstCommentUserName = firstCommentUserName;
    }
    public Integer getIsLike() {
        return isLike;
    }

    public void setIsLike(Integer isLike) {
        this.isLike = isLike;
    }

    public Integer getIsCollection() {
        return isCollection;
    }

    public void setIsCollection(Integer isCollection) {
        this.isCollection = isCollection;
    }

    public String getNackName() {
        return nackName;
    }

    public void setNackName(String nackName) {
        this.nackName = nackName;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public Integer getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(Integer likeCount) {
        this.likeCount = likeCount;
    }

    public Integer getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(Integer commentCount) {
        this.commentCount = commentCount;
    }

    public Integer getShareCount() {
        return shareCount;
    }

    public void setShareCount(Integer shareCount) {
        this.shareCount = shareCount;
    }

    public Integer getCollectionCount() {
        return collectionCount;
    }

    public void setCollectionCount(Integer collectionCount) {
        this.collectionCount = collectionCount;
    }

    public Integer getFirstCommentId() {
        return firstCommentId;
    }

    public void setFirstCommentId(Integer firstCommentId) {
        this.firstCommentId = firstCommentId;
    }

    public String getFirstCommentContent() {
        return firstCommentContent;
    }

    public void setFirstCommentContent(String firstCommentContent) {
        this.firstCommentContent = firstCommentContent;
    }

    public Integer getFirstCommentUserId() {
        return firstCommentUserId;
    }

    public void setFirstCommentUserId(Integer firstCommentUserId) {
        this.firstCommentUserId = firstCommentUserId;
    }

    public List<ImgEntiy> getImgList() {
        return imgList;
    }

    public void setImgList(List<ImgEntiy> imgList) {
        this.imgList = imgList;
    }

    public String getImgswh() {
        return imgswh;
    }

    public void setImgswh(String imgswh) {
        this.imgswh = imgswh;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImgs() {
        return imgs;
    }

    public void setImgs(String imgs) {
        this.imgs = imgs;
    }

    public Double getLng() {
        return lng;
    }

    public void setLng(Double lng) {
        this.lng = lng;
    }

    public Double getLat() {
        return lat;
    }

    public void setLat(Double lat) {
        this.lat = lat;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAddressPoi() {
        return addressPoi;
    }

    public void setAddressPoi(String addressPoi) {
        this.addressPoi = addressPoi;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
}
